package org.example.demo1.Entity;

import lombok.Builder;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
@Builder
public class ServiceInfo {
    private Boolean available;
    private String name;
    private String namespace;
    private String port;
    private String type;
    private String url;

    public Map<String, Object> toMap() {
        Map<String, Object> map = new HashMap<>();
        map.put("available", available);
        map.put("name", name);
        map.put("namespace", namespace);
        map.put("port", port);
        map.put("type", type);
        map.put("url", url);
        return map;
    }
}
